import { BaseGraphic } from "../../BaseGraphic"

export class BaseEntity extends BaseGraphic{

  get entityObject() {
    return this._entity
  }

  get dataSource() {
    return this._layer?.dataSource
  }

  /**
   * 对象添加到图层上的创建钩子方法，
   * 每次add时都会调用
   * @return {void}  无
   * @private
   */
  _addedHook() {
    this.dataSource.entities.add(this.entityObject)
  }
}